<%@page import="com.wanda.service.UserService"%>
<%@ page language="java" contentType="text/html"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>接待管理</title>
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="css/css.css" />
<script type="text/javascript" src="js/jquery1.9.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/sdmenu.js"></script>
<script type="text/javascript" src="js/laydate/laydate.js"></script>

<script type="text/javascript">
	function add(){
        	 $.ajax({
            	 type: "POST",
             	 url: "reception/insert.action",
             	 data: {
             		 name:$("#name").val(),
             		 phonenum:$("#phonenum").val(),
             		 exceptiontype:$("#exceptiontype").val(),
             		 rpeople:$("#rpeople").val(),
             		 comment1:$("#comment1").val()},
              	 dataType: "json",
              	success:function(data){ 
              		alert("添加成功。");
                	 
             	 }, 
            	error: function(data){
            		alert("请认真核对信息！"); 
            	}
        	 });
	}
	
	function checkMessage(){
		var name = $("#name").val();	
		var phonenum = $("#phonenum").val();
		if(name==""){
			 alert("姓名不能为空！"); 
			 $("#cname").focus();
			 return false;
		  }
		if(phonenum==""){
			 alert("联系方式不能为空！"); 
			 $("#phonenum").focus();
			 return false;
		  }
		return true;
	}
</script>
</head>

<body>

     <div class="right"  id="mainFrame">
     
     <div class="right_cont">
<ul class="breadcrumb">
	当前位置：<a href="index.jsp">首页</a> <span class="divider">/</span>
  	<a href="#">销售管理</a> <span class="divider">/</span>接待管理
</ul>
   
   <div class="title_right"><strong>添加接待信息</strong></div>  
<div style="width:900px;margin:auto;">
     <table class="table table-bordered">
     <tr>
     <td align="right" nowrap="nowrap" bgcolor="#f1f1f1">客户姓名：</td>
     <td><input type="text" name="name" id="name"  class="span1-1" /></td>
     <td align="right" nowrap="nowrap" bgcolor="#f1f1f1">电话号：</td>
     <td><input type="text" name="phonenum" id="phonenum"  class="span1-1" /></td>
       
     </tr>
     <tr>
       <td align="right" nowrap="nowrap" bgcolor="#f1f1f1">意向类型：</td>
       <td nowrap="nowrap"><select name="exceptiontype" id="exceptiontype" class=" span1-1">
         <option>一室一厅</option>
         <option>二室一厅</option>
         <option>三室一厅</option>
       </select>    
     </td>
     <td align="right" nowrap="nowrap" bgcolor="#f1f1f1">接待员：</td>
     <td><input type="text" name="rpeople" id="rpeople"  class="span1-1" value="${sessionScope.username}"/></td>
        </tr>
        <tr>
          <td align="right" nowrap="nowrap" bgcolor="#f1f1f1">客户备注：</td>
          <td colspan="5" nowrap="nowrap"><input type="text" name="comment1" id="comment1" class="span10"  /></td>
          </tr>
      </table>
           
     <table  class="margin-bottom-20  table no-border" >
       <tr>
     	<td class="text-center"><input type="button" onclick = "return checkMessage()&&add()" value="确定" class="btn btn-info"  style="width:80px;" /></td>
     </tr>
   </table>
   </div>    
 </div>     
</div></div>

</body>
</html>
